package com.lc.enums;

/**
 * @author liuc
 * @date 2021/5/5
 * @description
 **/
public enum RequestType {
    GET,
    POST,
    DELETE,
    PUT;

    public static RequestType match(String type){
        RequestType[] values = RequestType.values();
        for (RequestType value : values) {
            if(value.name().equalsIgnoreCase(type)){
                return value;
            }
        }
        return RequestType.GET;
    }
}
